import { ApiProperty } from '@nestjs/swagger';

export enum EDifyKnowledgeTypeEnum {
  Template = 'Template',
  Kit = 'Kit',
  Component = 'Component',
}

export class AddDifyKnowledgeApiDto {
  @ApiProperty({ description: '片段id' })
  fragmentId: number;

  @ApiProperty({
    description: '类型',
    enum: EDifyKnowledgeTypeEnum,
  })
  type: EDifyKnowledgeTypeEnum;

  @ApiProperty({ description: 'template/kit/component 名称' })
  name: string;

  @ApiProperty({ description: 'template/kit/component 描述', required: false })
  description?: string;

  @ApiProperty({ description: 'component 内容', required: false })
  content?: string;

  @ApiProperty({ description: '数据id' })
  id: number;
}
